//
//  YXDownloadManger.h
//  MockProject
//
//  Created by 周丽丽 on 16/8/26.
//  Copyright © 2016年 niuzhaowang. All rights reserved.
//

#import <Foundation/Foundation.h>
@class YXTaskListModel;
@class YXDownloader;
typedef void(^downloaderCompleteBlockForTaskListVC)();
typedef void(^downloaderCompleteBlockForDownloadCompleteVC)();
typedef void(^downloaderCompleteBlockForDownloadVC)();
typedef void(^downloaderStateChangeBlock)();
typedef void(^saveDownloaderBlock)();
typedef void(^networkRachabilityChangedBlock)();
@interface YXDownloadManger : NSObject
@property (nonatomic, assign) NSInteger maxDownloadCountValue;
@property (nonatomic, assign) BOOL downloadingNetworkState;
@property (nonatomic, strong) NSMutableArray *taskDownloadArr;
@property (nonatomic, strong) NSMutableArray *taskCompleteArr;
@property (nonatomic, copy) downloaderCompleteBlockForDownloadVC downloaderCompleteBlockForDownloadVC;
@property (nonatomic, copy) downloaderCompleteBlockForDownloadCompleteVC downloaderCompleteBlockForDownloadCompleteVC;
@property (nonatomic, copy) downloaderStateChangeBlock downloaderStateChangeBlock;
@property (nonatomic, copy) downloaderCompleteBlockForTaskListVC downloaderCompleteBlockForTaskListVC;
@property (nonatomic, copy)  saveDownloaderBlock saveDownloaderBlock;
@property (nonatomic, copy)  networkRachabilityChangedBlock networkRachabilityChangedBlock;
+ (instancetype)sharedInstance;
- (void)addDownloader:(YXDownloader *)downloader;
- (void)removeDownloader:(YXDownloader *)downloader;
- (void)removeAllCompleteDownloader;
- (void)saveAllDownloader;
- (void)loadAllDownloader;
@end
